<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>地址管理</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="../../css/style.css" />
		<link rel="stylesheet" href="../../css/title.css" />
		<style>
			.mui-table-view .mui-table-view-cell{background:#5e5e5e;padding:0px;margin-bottom:13px;}
			.adr-top{display: flex;flex-flow: row;justify-content: space-between;border-bottom:1px solid #999;padding:10px;}
			.adr-top div p{color:#fff;}
			.adr-top div span{color:#ccc;}
			.adr-down{padding:0;display: flex;flex-flow: row;justify-content: space-between;}
			.adr-down label{color:#ccc;}
			.adr-down .down-r button{border:none;color:#fab538;background:#5e5e5e;}
			.mui-table-view-cell:after{
				 background-color: #5e5e5e;
			}
			.mui-table-view:after{
				background-color: #5e5e5e;
			}
			.mui-table-view{
				background-color: #1a1a1a; 
			}
			
			.mui-checkbox input[type=checkbox]:checked:before, .mui-radio input[type=radio]:checked:before{
				color: #fbed21;
			}
		</style>
		
	</head>
	
	<body>

		<!-- 头部 -->
		<header class="mui-bar mui-bar-nav home_top">
			<h1 class="mui-title">地址管理</h1>
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		</header> 

		<div class="mui-content">
			<ul class="mui-table-view" id="main-area"></ul>
			<script id='main-template' type="text/template">
				<% for(var z in data){ var item=data[z]; %>
				<li class="mui-table-view-cell">
					<div class="adr-top">
						<div class="name-adr">
							<p><%=(item.username)%></p>
							<span><%=(item.addrdesc)%> <%=(item.address)%></span>
						</div>
						<div class="phonenum">
							<p><%=(item.mobile)%></p>
						</div>
					</div>
					<div class="adr-down">
						<div class="mui-input-row mui-checkbox mui-left">
							<label>默认地址</label>
							<input name="checkbox" value="默认地址" type="checkbox" data-id="<%=(item.address_id)%>" <% if(item.is_default==1){ %> checked <% } %> >
						</div>
						<div class="down-r">
							<button class="mui-btn edit_address" data-id="<%=(item.address_id)%>">编辑</button>
							<button class="mui-btn del_address" style="color:red;" data-id="<%=(item.address_id)%>">删除</button>
						</div>
					</div>
				</li>
				 <% } %>
			</script>
				<!--
				<li class="mui-table-view-cell">
					<div class="adr-top">
						<div class="name-adr">
							<p>李圆弧</p>
							<span>湖南省长沙市长沙县</span>
						</div>
						<div class="phonenum">
							<p>13154621212</p>
						</div>
					</div>
					<div class="adr-down">
						<div class="mui-input-row mui-checkbox mui-left">
							<label>默认地址</label>
							<input name="checkbox" value="默认地址" type="checkbox" >
						</div>
						<div class="down-r">
							<button class="mui-btn">编辑</button>
							<button class="mui-btn" style="color:red;">删除</button>
						</div>
					</div>
				</li>
				
				<li class="mui-table-view-cell">
					<div class="adr-top">
						<div class="name-adr">
							<p>李圆弧</p>
							<span>湖南省长沙市长沙县</span>
						</div>
						<div class="phonenum">
							<p>13154621212</p>
						</div>
					</div>
					<div class="adr-down">
						<div class="mui-input-row mui-checkbox mui-left">
							<label>默认地址</label>
							<input name="checkbox" value="默认地址" type="checkbox" >
						</div>
						<div class="down-r">
							<button class="mui-btn">编辑</button>
							<button class="mui-btn" style="color:red;">删除</button>
						</div>
					</div>
				</li> -->
				
			
			<div class="add-adr mui-button-group">
				<button class="mui-btn mui-btn-block" style="height:40px;line-height:0.5;margin-top:40px;color:#fff;background:#05508a;border: none;" id="add_address" lang>添加地址</button>
			</div>
		</div>
		
		<script src="../../lang/setting.js"></script>
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/config.js"></script>
		<script src="../../js/common.js"></script>
		<script src="../../js/arttmpl.js"></script>
		<script src="../../js/sockjs.js"></script>
		<script src="../../resource/setting/address.js"></script>
	</body>

</html>